]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
statusMenu: Lock screen before suspending
authorAdel Gadllah <adel.gadllah@gmail.com>
Wed, 9 Mar 2011 20:59:50 +0000 (21:59 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Wed, 9 Mar 2011 20:59:50 +0000 (21:59 +0100)
We need to lock the screen before suspending the system
to prevent unauthorized access to the system / account.

https://bugzilla.gnome.org/show_bug.cgi?id=643357

js/ui/statusMenu.js

index adf5491f74936d688354eee6cc7335cde0eb1698..9c251b83c0672ba324fe0113231b3ed6e39ca57d 100644 (file)
@@ -218,7 +218,9 @@ StatusMenuButton.prototype = {
 
         if (this._haveSuspend &&
             this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
-            this._upClient.suspend_sync(null);
+            this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
+                this._upClient.suspend_sync(null);
+            }));
         } else {
             Util.spawn(['gnome-session-quit', '--power-off']);
         }